//调用ajax,使用promise将data输出
function request (path,data,type = 'get'){
    return new Promise(resolve => {
        ajax({
            path,
            data,
            type,
            success:data=>{
                resolve(data);
            }
        })
    })
}
const baseUrl = (location.href).indexOf('wjp268hh.gz01.bdysite.com') == -1 ? 'http://localhost/project/php/' : 'http://wjp268hh.gz01.bdysite.com/project/php/' ;

const APIzhuce = data => request(`${baseUrl}02.php`,data);
const APIdenglu = data => request(`${baseUrl}03.php`,data);
const APIliebiao = data => request(`${baseUrl}04.php`,data);
const APIxiangqing = data => request(`${baseUrl}05.php`,data);
const APIjiagou = data => request(`${baseUrl}0502.php`,data);
const APIcar = data => request(`${baseUrl}06.php`,data);
const APIshanchu = data => request(`${baseUrl}0602.php`,data);
const APIzaici = data => request(`${baseUrl}0603.php`,data);
const APIjiesuan = data => request(`${baseUrl}07.php`,data);
const APIquanshan= data => request(`${baseUrl}0604.php`,data);
const APIsanji= data => request(`${baseUrl}0702.php`,data);

